require "erb"
require "json"
require "mongoid"
require "autoinc"
require 'pathname'
require_relative "restrouter"
require_relative "queryservice"
require_relative "utils"
require_relative "db/dbmodels"
require_relative "extmodels"
require_relative "datamodels"

LIBROOT=Pathname.new(File.dirname(__FILE__)).realpath #it's classes
def rootpath 
"#{LIBROOT}/../../../"
end
require 'logger'
def log
_logger=Logger.new("#{rootpath}/queryservice.log")
#_logger.level=Logger::INFO
_logger.level=Logger::DEBUG
_logger
end
include Query::DBModel